#ifndef CVMATDETECTTHREAD_H
#define CVMATDETECTTHREAD_H

#include <QObject>
#include <QThread>
#include <QTimer>
#include <QDir>
#include <QFileDialog>
#include <QMessageBox>


#include "detectthread.h"

class CvmatDetectThread: public DetectThread
{
    Q_OBJECT
public:
    CvmatDetectThread(QObject* parent = nullptr);

    ThreadSafeQueue *matQueue=nullptr;
    void init(std::shared_ptr<Inference> inference,bool RunWithCuda,bool islabel, ThreadSafeQueue *matQueue);


    void do_detect() override;
    int get_detect_id() override;
signals:
    void startread();
    void imageReady( QPixmap &pixmap);
    void readerrored(QString err_msg);
    void readfinished(int stau,QString err_msg);
};

#endif // CVMATDETECTTHREAD_H
